﻿using Microsoft.AspNetCore.Http.HttpResults;
using Microsoft.AspNetCore.Mvc;
using NuGet.Protocol.Core.Types;
using QuickGet.Core;
using QuickGet.Core.Models;

namespace QuickGet.Endpoints
{
    public static class EndpointsBuildExtensions
    {
        public static IEndpointRouteBuilder MapEndpoints(this IEndpointRouteBuilder endpoints)
        {
            var apiGroup = endpoints.MapGroup("/api");

            apiGroup.MapPackageEndpoints();
            apiGroup.MapPackageSourceEndpoints();
            apiGroup.MapInstalledPackageEndpoints();
            apiGroup.MapDownloadEndpoints();

            return endpoints;
        }

    }
}
